package com.ruoyi.model.service.impl;

import java.util.List;

import com.ruoyi.model.domain.Model;
import com.ruoyi.model.mapper.ModelMapper;
import com.ruoyi.model.service.IModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



/**
 * modelService业务层处理
 *
 * @author ruoyi
 * @date 2025-01-09
 */
@Service
public class ModelServiceImpl implements IModelService
{
    @Autowired
    private ModelMapper modelMapper;

    /**
     * 查询model
     *
     * @param id model主键
     * @return model
     */
    @Override
    public Model selectModelById(Long id)
    {
        return modelMapper.selectModelById(id);
    }

    /**
     * 查询model列表
     *
     * @param model model
     * @return model
     */
    @Override
    public List<Model> selectModelList(Model model)
    {
        return modelMapper.selectModelList(model);
    }

    /**
     * 新增model
     *
     * @param model model
     * @return 结果
     */
    @Override
    public int insertModel(Model model)
    {
        return modelMapper.insertModel(model);
    }

    /**
     * 修改model
     *
     * @param model model
     * @return 结果
     */
    @Override
    public int updateModel(Model model)
    {
        return modelMapper.updateModel(model);
    }

    /**
     * 批量删除model
     *
     * @param ids 需要删除的model主键
     * @return 结果
     */
    @Override
    public int deleteModelByIds(Long[] ids)
    {
        return modelMapper.deleteModelByIds(ids);
    }

    /**
     * 删除model信息
     *
     * @param id model主键
     * @return 结果
     */
    @Override
    public int deleteModelById(Long id)
    {
        return modelMapper.deleteModelById(id);
    }
}
